Range finder, three-dimensional measuring method and light source apparatus

ABSTRACT

The invention provides a range finder capable of carrying out three-dimensional measurement stably for a long period of time. A light pattern is projected on a subject by using a light source array unit in which a plurality of light sources, such as LEDs, are arranged. Even when each LED has a small light quantity, a sufficiently large quantity of light can be projected on the subject by the entire light source array unit, and hence, the three-dimensional measurement can be stably carried out. Also, a plurality of light patterns can be generated by electrically controlling a light emitting state of each LED of the light source array unit.

BACKGROUND OF THE INVENTION

[0001] The present invention relates to a technique regarding a rangefinder capable of taking three-dimensional information of a subject(namely, a three-dimensional camera capable of measuring a range image).

[0002]FIG. 21 is a diagram for showing the structure of a conventionalrange finder. In FIG. 21, a reference numeral 51 denotes a camera,reference numerals 52 a and 52 b denote light sources, a referencenumeral 55 denotes a light source control unit and a reference numeral56 denotes a distance calculation unit. The light source control unit 55makes the light sources 52 a and 52 b alternately emit light every fieldcycle in synchronization with a vertical synchronizing signal of thecamera 51.

[0003] At this point, it is assumed that the optical center of thecamera lies at the origin with the optical axis direction of the cameraset as the Z-axis, the horizontal direction set as the X-axis and thevertical direction set as the Y-axis, that the direction of a viewingpoint from the light sources is at an angle φ against the X-axis, thatthe direction of the viewing point from the camera is at an angle θagainst the X-axis, and that the light sources are positioned at (0,-D), namely, the base line length is D. The depth value Z of the viewingpoint P is calculated in accordance with the principle of trianglationcalculation as follows:

Z=Dtanθtanφ/(tanθ−tanφ)  (1)

[0004] In order to obtain the angle φ, predetermined light patterns areprojected by the light sources 52 a and 52 b.

[0005] As the light sources 52 a and 52 b, for example, flash lightsources 57 and 58 such as a xenon flash lamp are longitudinally disposedwith reflector plates 57 and 58 disposed behind to be shifted in thelateral direction as shown in FIG. 22A. FIG. 22B is a plan view of thelight sources of FIG. 22A. The light sources 52 a and 52 b radiate lightin ranges A and B, respectively.

[0006]FIG. 23 is a diagram for showing light patterns radiated from thelight sources 52 a and 52 b. In FIG. 23, the brightness obtained byprojecting the light on a virtual screen Y is indicated along adirection of an arrow shown in the drawing. Specifically, the lightprojected from each of the light sources 52 a and 52 b has acharacteristic that it is brightest on the center axis and is darkertoward the periphery. Such a characteristic is exhibited because thereflector plates 59 and 60 each in the shape of a semi-cylinder arerespectively disposed behind the flash light sources 57 and 58. Also,since the reflector plates 59 and 60 are shifted laterally in theirdirections, the projection ranges of the light sources 52 a and 52 bpartially overlap each other.

[0007]FIG. 24 is a diagram for showing the relationship between thelight projection angle φ in an H direction of FIG. 23 and the lightintensity. The H direction accords with the direction of a crossing linebetween the virtual screen Y and one optional plane S among a pluralityof planes each including the light source center and the lens center. Ina region α of FIG. 24, one of the light patterns projected from thelight sources 52 a and 52 b is bright relatively on the right hand sideand the other is bright relatively on the left hand side, whereas thebrightness of the light pattern is varied also along the heightdirection (Y-axis direction).

[0008]FIG. 25 is a graph for showing the relationship between the lightintensity ratio between the two kinds of projected light in the region aof FIG. 24 and the light projection angle φ. As shown in FIG. 25, thelight intensity ratio and the angle φ are in a one-to-one correspondingrelationship in the region α.

[0009] In order to measure a distance, the two kinds of light patternsare alternately projected on a flat plane vertically provided so as toface the light sources at a predetermined distance and reflected lightis taken by the camera 1, so that data of the relationship between thelight intensity ratio and the light projection angle as shown in FIG. 25can be previously obtained with respect to each Y-coordinate(corresponding to a Y-coordinate on the CCD). A data with respect toeach Y-coordinate means a data with respect to each of the plural planesincluding the light source center and the lens center. Also, when thelight sources 52 a and 52 b are disposed so that a line extendingbetween the lens center of the camera 51 and the light sources 52 a and52 b can be parallel to the X-axis of the CCD camera face, a distancecan be accurately calculated by using the data of the relationshipbetween the light intensity ratio and the light projection angledetermined with respect to each Y-coordinate.

[0010] Assuming that a point P of FIG. 21 is the viewing point, theangle φ of the point P from the light source is measured by using thebrightness ratio of the point P obtained images taken with the two kindsof light patterns projected and the relationship as shown in FIG. 25corresponding to the Y-coordinate of the point P. Furthermore, the angleφ of the point P from the camera is determined on the basis of theposition in the image (namely, the pixel coordinate values of the pointP) and camera parameters (such as the focal length and the position ofthe optical center of the lens system). Then, the distance is calculatedin accordance with the equation (1) based on these two angles φ and θand the distance (base line length) D between the position of the lightsources and the position of the optical center of the camera.

[0011] In this manner, when the light sources for generating the lightpatterns that are monotonically increased/decreased in accordance withthe projection direction as in the region a of FIG. 24 are used, thethree-dimensional measurement of a subject can be simply carried out.

[0012] However, in the conventional structure, the xenon flash lamp,which has a life of merely approximately 5000 stable emissions, is usedas the light source. Therefore, when the range finder is used for a longperiod of time, maintenance such as exchange of the lamp should befrequently conducted. Also, the stability of the quantity of lightemitted by the flash lamp is merely several %, and hence, highermeasurement accuracy cannot be obtained.

[0013] Furthermore, a light source with a long life is, for example, anLED (light emitting diode), but the quantity of light emitted by one LEDis small. Therefore, when the LED is singly used, the light quantity isso insufficient that the three-dimensional measurement cannot be stablycarried out.

[0014] Moreover, since the projected light patterns are determined inaccordance with the shapes of the reflector plates in the conventionalstructure, merely one set of light patterns can be generated inprinciple.

SUMMARY OF THE INVENTION

[0015] An object of the invention is providing a range finder usable fora long period of time and capable of executing stable three-dimensionalmeasurement. Another object is easily generating optional light patternsin the range finder.

[0016] Specifically, the range finder of this invention for measuring athree-dimensional position of a subject by projecting light on thesubject and receiving reflected light comprises a light source arrayunit in which a plurality of light sources are arranged; and a lightsource control unit for allowing at least two kinds of light patterns tobe projected from the light source array unit by controlling a lightemitting state of each of the plurality of light sources of the lightsource array unit.

[0017] According to this invention, since the light patterns areprojected from the plural light sources included in the light sourcearray unit, even when each light source has a small light quantity, asufficiently large quantity of light can be projected on the subject asa whole, so that stable three-dimensional measurement can carried out.Also, since the light patterns are generated by controlling the lightemitting states of the light sources of the light source array unit, anoptional light pattern can be electrically generated without using amechanical mechanism.

[0018] In the range finder, each of the plurality of light sources ispreferably an LED. An LED has a characteristic that the light quantityis small but the life is comparatively long. Therefore, when the lightsource array unit is composed of the LEDs, a range finder usable for along period of time can be realized.

[0019] Furthermore, the method of this invention for measuring athree-dimensional position of a subject based on reflected light imagesrespectively obtained with at least two kinds of light patternsprojected on the subject, comprises the steps of storing a parameter ofan equation for approximating a space locus having a constant lightintensity ratio between the two kinds of light patterns beforethree-dimensional measurement; obtaining a brightness ratio of a targetpixel on the basis of reflected light images respectively obtained withthe two kinds of light patterns projected; and carrying out thethree-dimensional measurement by using the brightness ratio of thetarget pixel and the parameter of the space locus.

[0020] Alternatively, the method of this invention for measuring athree-dimensional position of a subject based on reflected light imagesrespectively obtained with at least two kinds of light patternsprojected on the subject, comprises the steps of storing a plurality ofluminance ratio images in each of which a light intensity ratio betweenthe two kinds of light patterns is expressed on a plane with a differentfixed depth value before three-dimensional measurement; obtaining abrightness ratio of a target pixel based on reflected light imagesrespectively obtained with the two kinds of light patterns projected;and carrying out the three-dimensional measurement by comparing thebrightness ratio of the target pixel with a light intensity ratio in thevicinity of coordinates of the target pixel on each of the luminanceratio images.

[0021] Alternatively, the method of this invention for measuring athree-dimensional position of a subjected based on reflected lightimages respectively obtained with at least two kinds of light patternsprojected on the subject, comprises the steps of storing a plurality ofluminance ratio images in each of which a light intensity ratio betweenthe two kinds of light patterns is expressed on a plane with a differentfixed depth value before three-dimensional measurement; settingrepresentative points on each of the luminance ratio images anddetermining a parameter of a relational expression between a lightintensity ratio and a depth value of each of the representative pointson the basis of the plurality of luminance ratio images and thedifferent depth values respectively corresponding to the luminance ratioimages; obtaining a light intensity ratio of a target pixel based onreflected light images respectively obtained with the two kinds of lightpatterns projected; and carrying out the three-dimensional measurementby using coordinate values of the target pixel, the light intensityratio of the target pixel and the parameter of the relational expressionbetween the light intensity ratio and the depth value of each of therepresentative points.

[0022] Moreover, the range finder of this invention for measuring athree-dimensional position of a subject by projecting light on thesubject and receiving reflected light comprises a projection unit forprojecting at least two kinds of light patterns; and a projected lightpattern control unit for making a measurement range or measurementaccuracy variable by changing a set of light patterns to be projectedfrom the projection unit.

[0023] In this range finder, the measurement range or measurementaccuracy can be controlled by changing a set of light patterns to beprojected from the projection unit. As a result, a variety ofmeasurement modes can be realized.

[0024] The light source apparatus of this invention comprises aplurality of light sources arranged therein, which is capable ofprojecting a desired light pattern by controlling a light emitting stateof each of the plurality of light sources, and the plurality of lightsources are arranged on a flat surface with optical axes thereofradially disposed.

[0025] Alternatively, the light source apparatus of this inventioncomprising a plurality of light sources arranged therein, which iscapable of projecting a desired light pattern by controlling a lightemitting state of each of the plurality of light sources, and aprojection range is divided into a plurality of ranges in a directionfor forming the light pattern, and groups of light sources respectivelycovering the plurality of divided ranges are aligned in a directionperpendicular to the direction for forming the light pattern.

BRIEF DESCRIPTION OF THE DRAWINGS

[0026]FIG. 1 is a block diagram for showing the structure of a rangefinder according to Embodiment 1 of the invention;

[0027]FIGS. 2A, 2B and 2C are diagrams for showing examples of thestructure of a light source array unit, and specifically, FIG. 2A is across-sectional view thereof and FIGS. 2B and 2C are plan views thereof;

[0028]FIGS. 3A, 3B and 3C are diagrams for showing examples of theappearance of the light source array unit;

[0029]FIGS. 4A and 4B are diagrams for showing two kinds of lightpatterns generated by controlling the emission intensity of a lightsource;

[0030]FIG. 5 is a diagram for showing switching timing between the lightpatterns;

[0031]FIGS. 6A and 6B are diagrams for showing two kinds of lightpatterns generated by controlling the emission time of a light source;

[0032]FIG. 7 is a diagram for explaining three-dimensional measurementaccording to an embodiment of the invention in which the positionalrelationship among the light source array unit, a camera and a subjecton a plane with a fixed y-coordinate of the camera is shown;

[0033]FIG. 8 is a diagram for showing a curve approximating a spacelocus having a constant light intensity ratio;

[0034]FIG. 9 is a diagram for explaining the three-dimensionalmeasurement according to the embodiment of the invention in whichluminance ratio images previously prepared are shown;

[0035]FIG. 10 is a diagram for showing calculation of an averageluminance ratio in the vicinity of a target pixel in the luminance ratioimage;

[0036]FIG. 11 is a graph for showing the relationship between adifference in the luminance ratio (ρm−ρ0) and a depth value of eachluminance ratio image;

[0037]FIG. 12 is a diagram for showing another example of thethree-dimensional measurement of the embodiment;

[0038]FIG. 13 is a diagram for showing representative points used in thethree-dimensional measurement;

[0039]FIG. 14 is a diagram of a finite element model used in distancecalculation;

[0040]FIGS. 15A, 15B and 15C are diagrams for explaining modification ofthe quantity of light emitted by the light source array;

[0041]FIGS. 16A and 16B are graphs for showing the relationship betweenlight patterns and a brightness ratio obtained through experiments bythe present inventors;

[0042]FIG. 17 is a block diagram for showing the structure of a rangefinder according to Embodiment 2 of the invention;

[0043]FIGS. 18A and 18B are diagrams for showing an example of controlof a measurement range in Embodiment 2 of the invention, andspecifically, FIG. 18A shows the control where the size of themeasurement range is changed and FIG. 18B shows the control where theposition of the measurement range is changed;

[0044]FIGS. 19A and 19B are diagrams of examples of measurement modes ofEmbodiment 2 of the invention;

[0045]FIG. 20 is a diagram for showing the structure of an organic ELdevice;

[0046]FIG. 21 is a diagram for showing the structure of a conventionalrange finder;

[0047]FIGS. 22A and 22B are diagrams for showing an example of thestructure of light sources of FIG. 21;

[0048]FIG. 23 is a diagram for showing a distribution of projected lightobtained by the structure of FIG. 21;

[0049]FIG. 24 is a graph for showing light patterns and a measurementrange obtained by the structure of FIG. 21; and

[0050]FIG. 25 is a diagram for showing the relationship between a lightprojection angle and a light intensity ratio obtained based on the graphof FIG. 24.

DETAILED DESCRIPTION OF THE INVENTION

[0051] Preferred embodiments of the invention will now be described withreference to the accompanying drawings.

[0052] Embodiment 1

[0053]FIG. 1 is a diagram for showing the structure of a range finderaccording to Embodiment 1 of the invention. In FIG. 1, a referencenumeral 1 denotes a camera, a reference numeral 11 denotes a lightsource array unit in which a plurality of light sources are arranged, areference numeral 12 denotes a light source control unit for controllinglight emitting states of the respective light sources of the lightsource array unit 11, and a reference numeral 13 denotes a distancecalculation unit, that is, a three-dimensional measurement unit, forcarrying out three-dimensional measurement based on reflected lightimages taken with the camera 1.

[0054] In the structure of FIG. 1, two kinds of light patterns as thoseshown in FIG. 23 are projected from the light source array unit 11 on asubject and reflected light from the subject is taken by using thecamera 1, so as to measure the three-dimensional position of thesubject.

[0055]FIGS. 2A through 2C are diagrams for showing examples of thestructure of the light source array unit 11, and specifically FIG. 2A isa cross-sectional view thereof and FIGS. 2B and 2C are plan viewsthereof. The light source array unit 11 of FIGS. 2A through 2C uses aninfrared LED (light emitting diode) as a light source. As shown in FIG.2A, a plurality of LEDs are arranged on a curved surface of acylindrical surface or a spherical surface. This is because a single LEDhas a radiation range (radiation angle) of merely approximately 20degrees and hence cannot project light over a large range, and hence,the optical axes of the respective LEDs are thus radially disposed.

[0056] Furthermore, in the plane structure, the LEDs may be arranged ina lattice pattern as shown in FIG. 2B or in a checkered (zigzag) patternas shown in FIG. 2C. In the arrangement of FIG. 2C, the number of LEDsdisposed in each unit area is larger and hence the light quantity perunit area can be larger than in the arrangement of FIG. 2B, andtherefore, the size of the light source array unit 11 can be smaller.Alternatively, the light sources may be concentrically arranged.

[0057]FIG. 3A is a perspective view for showing the appearance of anexample of the light source array unit 11 fabricated by the presentinventors on an experimental basis. In the light source array unit ofFIG. 3A, approximately 200 LEDs are arranged in a checkered pattern on acurved surface of a cylinder.

[0058]FIG. 3B is a diagram for showing the appearance of another exampleof the light source array unit 11 fabricated as a light source apparatusby the present inventors on an experimental basis, and FIG. 3C is across-sectional view of FIG. 3B. In the structure of FIG. 3C, the LEDsare arranged on flat surfaces with their optical axes radially disposed.When the LEDs are thus provided on a substantially flat face, the depthof the light source array unit 11 can be reduced.

[0059] Also, in the structure of FIG. 3A, the LEDs are aligned in adirection for forming light patterns (in the lateral direction in FIG.3A). In contrast, in the structure of FIG. 3B, the range for projectingthe light patterns is divided into two ranges, that is, a right rangeand a left range, so that the LEDs aligned on each horizontal line cancover either of the divided ranges. In other words, groups of lightsources (groups G1 and G2 in FIG. 3B) each covering each divided rangeare aligned in a direction perpendicular to the direction for formingthe light patterns (in the vertical direction in FIG. 3B). When thisstructure is employed, the lateral size of the light source array unit11 can be substantially halved, so as to attain a structure closer tothat of a point light source than the structure of FIG. 3A.

[0060] Although each group G1 or G2 of the LEDs includes three lines ofLEDs so as to change the radiation directions of the LEDs every threelines in FIG. 3B, the radiation directions may be changed every line orevery plural lines other than three lines.

[0061] Furthermore, although the light pattern projection range isdivided into the two ranges in FIG. 3B, the projection range may bedivided into three or more ranges, so as to align groups of lightsources covering the respective ranges in the vertical direction. Inthis case, when the number of dividing the projection range isincreased, the lateral size of the light source array unit 11 can befurther reduced, whereas the longitudinal size is reversely increased,and hence, the light intensity distribution as shown in FIG. 15A may bevaried in the vertical direction of an image. If the degree of thisvariation falls within a range in which the light intensity patterns canbe accurately approximated through calculation algorithm describedbelow, such a light source array unit can be practically used as thelight source apparatus.

[0062]FIGS. 4A and 4B are diagrams of two kinds of light patternsgenerated by using the light source array unit 11. The light sourcecontrol unit 12 generates the light patterns by controlling the emissionintensities (brightness) of the LEDs of the light source array unit 11in accordance with the positions of the LEDs. Herein, the emissionintensity is controlled by adjusting a voltage applied to each LEDserving as the light source (namely, a current flowing the LED). In thelight pattern A shown in FIG. 4A, the light quantities of the LEDs aremonotonically increased in accordance with line numbers of the LEDs, andin the light pattern B shown in FIG. 4B, the light quantities of theLEDs are monotonically decreased in accordance with the line numbers ofthe LEDs.

[0063] The light source control unit 12 allows the light pattern A andthe light pattern B of FIGS. 4A and 4B to be alternately projected inaccordance with exposure timing (exposure cycle) of the camera 1 asshown in FIG. 5. As a result, a reflected light image through projectionof the light pattern A and a reflected light image through projection ofthe light pattern B are alternately obtained from the camera 1. In otherwords, light patterns similar to those in the region α of FIG. 24 areprojected on the subject, and images of the subject with the respectivelight patterns projected are alternately obtained.

[0064] Although the two kinds of light patterns A and B are hereincontinuously and alternately projected for taking an image sequence, inthe case where a still image is taken, two images are taken with thecamera 1 with the light patterns A and B respectively projected.

[0065] Also, the brightness of the LEDs themselves are controlled forcontrolling the light quantities of the LEDs in the above description,the light patterns may be generated instead by controlling the emissiontimes of the respective LEDs in accordance with the positions of theLEDs by the light source control unit 12. In this case, with a currentflowing through each LED kept constant, merely the emission times of therespective LEDs are controlled within the exposure time of the camera.

[0066]FIGS. 6A and 6B are diagrams of the two kinds of light patternsgenerated by controlling the emission times. In the light pattern Ashown in FIG. 6A, the emission times of the LEDs are monotonicallyincreased in accordance with the line numbers of the LEDs, and in thelight pattern B shown in FIG. 6B, the emission times of the LEDs aremonotonically decreased in accordance with the line numbers of the LEDs.Within the exposure time of the camera 1, the total light quantity isincreased as the LED emits light for a longer time, so that such lightpatterns can be generated.

[0067] In the case where an LED itself generates heat or in the casewhere a current flowing through an LED is changed with time owing to atemperature characteristic of an LED driving circuit, the brightness ofthe LED is varied. In this case, an error may be caused in the generatedlight pattern when the emission intensity is controlled. However, whenthe light quantities are controlled by changing the emission times withthe current flowing through each LED kept constant, the LED drivingcircuit can be stabilized and the heat generated by the LEDs themselvescan be suppressed, and hence, the light patterns themselves areminimally varied. Accordingly, the three-dimensional measurement using alight intensity ratio of reflected light is minimally affected by theLED driving circuit and the heat generated by the LEDs. Furthermore,since the emission times are changed with the emission intensity keptconstant, the light quantity ratio can be accurately set even when theperformances of the respective LEDs are varied. Moreover, in the casewhere the light intensity is controlled by using a current flowingthrough the LED, the light intensity should be controlled by an analogcircuit, but the emission time can be easily controlled by a digitalcircuit. Therefore, the accuracy in the emission control can be easilyimproved. In other words, when the light quantities of the respectiveLEDs are controlled by adjusting the emission times, highly accurate andstable light patterns can be generated.

[0068] (Three-Dimensional Measurement)

[0069] Next, a method for carrying out the three-dimensional measurementon the basis of the obtained reflected light images will be described.This corresponds to processing executed by the distance calculation unit13 of FIG. 1.

[0070] The calculation described with reference to the prior art can bealso employed in this embodiment, but in the conventionalthree-dimensional calculation, it is premised that the light source is apoint light source. Therefore, in the case where the LED array is usedas the light source as in this embodiment, there is a possibility of anerror caused owing to the size of the light source itself when theconventional method is directly employed. Accordingly, a method foraccurately carrying out the three-dimensional measurement withoutcausing an error even when the light source has its own size will now bedescribed in detail.

[0071]FIG. 7 is a diagram for showing the positional relationship amongthe light source array unit 11, the camera 1 and the subject on a planewith a fixed y-coordinate (y1) of the camera. As shown in FIG. 7,portions where a brightness ratio ρ (light intensity ratio) obtainedfrom the images respectively taken with the light patterns A and Bprojected is constant (namely, ρ=ρ0, ρ1, ρ2, ρ3 or ρ4) can berepresented by a curve group F. Therefore, an equation, f(ρ, x, z)=0,for approximating these curves is previously obtained before using therange finder.

[0072] The equation f is obtained as follows: In FIG. 7, planes with afixed Z-coordinate (planes disposed as frontal parallel planes) aredisposed in front of the camera 1 in positions at various depths (Z=z0,z1, etc.), and the light patterns A and B are projected from the lightsource array unit 11 so as to take images by using the camera 1.

[0073] Next, as shown in FIG. 8, a brightness ratio of each pixelbetween the images respectively corresponding to the light patterns Aand B is obtained, and in the same y-coordinate, y0, a curve linkingpoints having the same brightness ratio ρ (corresponding to a brokenline of FIG. 8) is allocated to a regression curve. Instead, linearpolygonal line approximation may be employed instead of allocation tothe regression curve. Thus, an equation of the regression curve by usingthe brightness ratio ρ as a parameter is obtained with respect to eachy-coordinate of the images. Specifically, a parameter of an equation forapproximating a space locus having a constant light intensity ratio ρ ispreviously stored as the preparation for the three-dimensionalmeasurement.

[0074] Next, the three-dimensional measurement is actually carried outon the basis of the taken image data.

[0075] It is herein assumed that a target pixel has coordinates (x1,y1). In the coordinates (x1, y1), a luminance ratio in images takenrespectively with the light patterns A and B projected is calculated.When the luminance ratio is assumed to be ρ1, an equal luminance ratiocurve satisfying ρ=ρ1 (corresponding to a curve f1 of FIG. 7) isselected on a plane where y=y1. At this point, an intersection C betweenthe selected curve f0 and a straight line 1 drawn through a target pointon the CCD (x1, y1) and the lens center of the camera corresponds to thethree-dimensional position to be obtained.

[0076] In this manner, the brightness ratio is obtained from the twoimages with respect to each pixel, and with respect to a target pixel, acorresponding equal luminance ratio curve is determined on the basis ofthe luminance ratio. Then, an intersection between the equal luminanceratio curve and the straight line 1 is obtained, and thus, thethree-dimensional measurement of each pixel of the taken images can becarried out.

[0077] Furthermore, when the term of y is involved in the approximationequation f of the equal luminance ratio curve, namely, when an equation,f (ρ, x, y, z)=0 is used, so as to be three-dimensionally allocated tothe regression curve, the curve f to be used in the three-dimensionalcalculation can be directly determined on the basis of the luminanceratio ρ. In this case, there may be no intersection between the line 1of FIG. 7 and the curve f, but in such a case, an average value ofpoints where the distance between the line 1 and the curve f is minimumor an intersection obtained through projection on a ZX plane may beobtained as the intersection.

[0078] Another method for carrying out the three-dimensional measurementis as follows:

[0079] As shown in FIG. 9, a plane with a fixed Z value (depth value)(Z0) is disposed in front of the camera 1, and the light patterns A andB are projected on the plane so as to take the images by using thecamera 1. Then, a brightness ratio of each pixel is obtained and animage representing the luminance ratio is previously stored as aluminance ratio image C0. Similarly, with respect to different depthvalues Z1 through Z5, luminance ratio images C1 through C5 arerespectively stored.

[0080] Next, the three-dimensional measurement is actually carried outfrom the taken image data.

[0081] It is herein assumed that a target pixel has coordinates (x1,y1). In the coordinates (x1, y1), the luminance ratio between the imagesrespectively obtained with the light patterns A and B projected isassumed to be ρ0. At this point, in a previously obtained luminanceratio image Ci (i=0 through 5), an average luminance ratio ρm isobtained in a range (Δx, Δy) in the vicinity of the coordinates of thetarget pixel (x1, y1) as shown in FIG. 10. The three-dimensionalposition is measured by comparing the luminance ratio ρ0 of the targetpixel and the average luminance ratio ρm obtained in the vicinity of thecoordinates.

[0082]FIG. 11 is a graph for showing the relationship between adifference in the luminance ratio (ρm−ρ0) and the depth value of eachluminance ratio image. As shown in FIG. 11, a point where the difference(ρm−ρ0) is zero, namely, a Z value Zm of the luminance ratio image atwhich the luminance ratio ρ0 obtained in the target pixel (x1, y1) isestimated to be equal to the average luminance ratio ρm obtained in thevicinity of the coordinates, can be obtained as the depth value of thetarget pixel (x1, y1). In this case, there is no need to previouslyobtain a regression curve, and the three-dimensional measurement can berealized through simple calculation.

[0083]FIG. 12 is a diagram for showing still another example of thethree-dimensional measurement of this embodiment. In FIG. 12, areference numeral 100 denotes a memory for previously storing luminanceratio images with respect to a plurality of depth values, S11 denotes adepth calculation parameter calculating step, S12 denotes a lightintensity ratio calculating step for calculating a light intensity ratioimage based on the light patterns A and B, S13 denotes a depthcalculating step and S14 denotes a three-dimensional coordinatescalculating step. The memory 100 is included in the distance calculationunit 13 of FIG. 1, and the steps S11 through S14 are executed by thedistance calculation unit 13.

[0084] The memory 100 previously stores the luminance ratio images withrespect to the plural depth values obtained in the same manner as in thethree-dimensional measurement shown in FIG. 9.

[0085] Next, the calculation of a depth value Z among thethree-dimensional coordinates will be described. The depth value Z iscalculated, as shown in FIG. 13, with respect to each pixel throughinterpolation calculation using a relational expression between thelight intensity ratio ρ and the depth value Z in each of nodal points(representative points) arranged in the form of a rectangle in theluminance ratio image. Specifically, in FIG. 13, the relationshipbetween the light intensity ratio ρ and the depth value Z obtainedbetween nodal lines is determined through the interpolation calculationusing the relational expression between the light intensity ratio ρ andthe depth value Z on each line (nodal line) drawn through the nodalpoints and extending parallel to the Z-axis.

[0086] Now, the calculation of the relational expression between thelight intensity ratio ρ and the depth value Z on the nodal line (namely,calibration) will be described.

[0087] The relationship between the light intensity ratio ρ and thedepth value Z on a nodal line is obtained by applying a spacedistribution model of the light intensity ratio to light intensityratios obtained on planes (calibration planes) respectively disposed ata plurality of distances. Thus, the light intensity ratio ρ and thedistance value Z can be related to each other, so that the depth valuecan be calculated.

[0088]FIG. 14 shows an infinite element model used in the distancecalculation. In FIG. 14, x and y denote coordinate values of a pixel andZ denotes a depth value (three-dimensional coordinate value). Elementsare defined as a square pole composed of four nodal lines vertical tothe xy plane. In this model, the distance Z is obtained on the basis ofa distribution of the light intensity ratio ρ in the three-dimensionalspace of xyZ. Specifically, an equation, ρ(x, y, Z) is observed and thisequation is solved for Z.

[0089] In this embodiment, with respect to each nodal line, therelationship between the light intensity ratio ρ and the distance Z ismodeled as a cubic equation by using the following equation 1:

[0090] Equation 1: $Z = {{Xpi} = {\begin{matrix}\begin{matrix}\begin{matrix}\begin{pmatrix}\rho^{3} & \rho^{2} & \rho & 1\end{pmatrix} \\\quad\end{matrix} \\\quad\end{matrix} \\\quad\end{matrix}\begin{pmatrix}\begin{matrix}\begin{matrix}a_{i} \\b_{i}\end{matrix} \\c_{i}\end{matrix} \\d_{i}\end{pmatrix}\quad \left( {{i = 0},1,2,3} \right)}}$

[0091] wherein ρ is the light intensity ratio and p (=(a, b, c, d)t) isa parameter vector. Since the nodal lines are two-dimensionally disposedas shown in FIG. 13, distance calculation with constant accuracy can becarried out in accordance with optional change of the parameter vectorp. Specifically, when the nodal lines are densely disposed, although thecalculation quantity is increased, the accuracy in measuring the depthvalue can be improved, and when the nodal lines are sparsely disposed,although the accuracy in calculating the depth value is lowered, thecalculation quantity can be reduced.

[0092] In coordinate values of a pixel positioned between nodal lines,the parameter vector p is determined through linear interpolation ofparameter vectors p0 through p3 of the nodal lines as follows:

Z=Xp  Equation 2

[0093] At this point, the following equation 3 holds:

p=(1−s)(1−t)p ₀ +s(1−t)p ₁+(1−s)tp ₂ +stp ₃  Equation 3

[0094] wherein s and t are linear weights in the x-direction and they-direction. The parameter vectors p0, p1, p2 and p3 of the respectivenodal lines are determined so as to minimize a distance error in thepreviously stored plural planes (calibration planes) within the rangesof the elements, namely, so as to minimize the following equation 4:

[0095] Equation 4:$J = {\sum\limits_{k = 1}^{n}\quad {\sum\limits_{{W \in x},y}^{\quad}\quad \left( {{X_{xy}p} - Z_{k}} \right)^{2}}}$

[0096] wherein W is a bottom area of the elements surrounded with thefour nodal lines as shown in FIG. 14, n is the number of planes(calibration planes) disposed in the Z-direction. On the basis of thecondition for minimizing Equation 4, namely, on the basis of thefollowing equation 5:

[0097] Equation 5:$\frac{\partial J}{\partial p_{0}} = {\frac{\partial J}{\partial p_{1}} = {\frac{\partial J}{\partial p_{2}} = {\frac{\partial J}{\partial p_{3}} = 0}}}$

[0098] the following equation 6 is obtained.

[0099] Equation 6: $\begin{matrix}{\frac{\partial J}{\partial p_{0}} = {{2{\sum\limits_{k = 1}^{n}\quad {\sum\limits_{{W \in x},y}^{\quad}\quad {\left( {1 - s_{x}} \right)\left( {1 - t_{y}} \right){X_{xy}^{t}\left( {{X_{xy}p} - Z_{k}} \right)}}}}} = 0}} \\{\frac{\partial J}{\partial p_{1}} = {{2{\sum\limits_{k = 1}^{n}\quad {\sum\limits_{{W \in x},y}^{\quad}\quad {{s_{x}\left( {1 - t_{y}} \right)}{X_{xy}^{t}\left( {{X_{xy}p} - Z_{k}} \right)}}}}} = 0}} \\{\frac{\partial J}{\partial p_{2}} = {{2{\sum\limits_{k = 1}^{n}\quad {\sum\limits_{{W \in x},y}^{\quad}\quad {\left( {1 - s_{x}} \right)t_{y}{X_{xy}^{t}\left( {{X_{xy}p} - Z_{k}} \right)}}}}} = 0}} \\{\frac{\partial J}{\partial p_{3}} = {{2{\sum\limits_{k = 1}^{n}\quad {\sum\limits_{{W \in x},y}^{\quad}{s_{x}t_{y}{X_{xy}^{t}\left( {{X_{xy}p} - Z_{k}} \right)}}}}} = 0}}\end{matrix}$

[0100] When Equation 6 is rearranged, the following equation 7 isobtained:

[0101] Equation 7: $\begin{matrix}{\begin{pmatrix}{\sum\limits_{k = 1}^{n}\quad {\sum\limits_{{W \in x},y}^{\quad}\quad {\left( {1 - s_{x}} \right)^{2}\left( {1 - t_{y}} \right)^{2}X_{xy}^{t}X_{xy}}}} & {\sum\limits_{k = 1}^{n}\quad {\sum\limits_{{W \in x},y}^{\quad}\quad {{s_{x}\left( {1 - s_{x}} \right)}\left( {1 - t_{y}} \right)^{2}X_{xy}^{t}X_{xy}}}} & {\sum\limits_{k = 1}^{n}\quad {\sum\limits_{{W \in x},y}^{\quad}\quad {\left( {1 - s_{x}} \right)^{2}\left( {1 - t_{y}} \right)X_{xy}^{t}X_{xy}}}} & {\sum\limits_{k = 1}^{n}\quad {\sum\limits_{{W \in x},y}^{\quad}\quad {\left( {1 - s_{x}} \right){t_{y}\left( {1 - t_{y}} \right)}X_{xy}^{t}X_{xy}}}} \\{\sum\limits_{k = 1}^{n}\quad {\sum\limits_{{W \in x},y}^{\quad}\quad {\left( {1 - s_{x}} \right)\left( {1 - t_{y}} \right)^{2}X_{xy}^{t}X_{xy}}}} & {\sum\limits_{k = 1}^{n}\quad {\sum\limits_{{W \in x},y}^{\quad}{s_{x}\quad \left( {1 - t_{y}} \right)^{2}X_{xy}^{t}X_{xy}}}} & {\sum\limits_{k = 1}^{n}\quad {\sum\limits_{{W \in x},y}^{\quad}\quad {\left( {1 - s_{x}} \right){t_{y}\left( {1 - t_{y}} \right)}X_{xy}^{t}X_{xy}}}} & {\sum\limits_{k = 1}^{n}\quad {\sum\limits_{{W \in x},y}^{\quad}\quad {s_{x}^{2}{t_{y}\left( {1 - t_{y}} \right)}X_{xy}^{t}X_{xy}}}} \\{\sum\limits_{k = 1}^{n}\quad {\sum\limits_{{W \in x},y}^{\quad}\quad {\left( {1 - s_{x}} \right)^{2}\left( {1 - t_{y}} \right)X_{xy}^{t}X_{xy}}}} & {\sum\limits_{k = 1}^{n}\quad {\sum\limits_{{W \in x},y}^{\quad}\quad {{s_{x}\left( {1 - s_{x}} \right)}{t_{y}\left( {1 - t_{y}} \right)}X_{xy}^{t}X_{xy}}}} & {\sum\limits_{k = 1}^{n}\quad {\sum\limits_{{W \in x},y}^{\quad}\quad {\left( {1 - s_{x}} \right)^{2}t_{y}^{2}X_{xy}^{t}X_{xy}}}} & {\sum\limits_{k = 1}^{n}\quad {\sum\limits_{{W \in x},y}^{\quad}\quad {{s_{x}\left( {1 - s_{x}} \right)}t_{y}^{2}X_{xy}^{t}X_{xy}}}} \\{\sum\limits_{k = 1}^{n}\quad {\sum\limits_{{W \in x},y}^{\quad}\quad {{S_{x}\left( {1 - s_{x}} \right)}{t_{y}\left( {1 - t_{y}} \right)}X_{xy}^{t}X_{xy}}}} & {\sum\limits_{k = 1}^{n}\quad {\sum\limits_{{W \in x},y}^{\quad}{S_{x}^{2}t_{y}\quad \left( {1 - t_{y}} \right)X_{xy}^{t}X_{xy}}}} & {\sum\limits_{k = 1}^{n}\quad {\sum\limits_{{W \in x},y}^{\quad}\quad {{s_{x}\left( {1 - s_{x}} \right)}t_{y}^{2}X_{xy}^{t}X_{xy}}}} & {\sum\limits_{k = 1}^{n}\quad {\sum\limits_{{W \in x},y}^{\quad}{s_{x}^{2}\quad t_{y}^{2}X_{xy}^{t}X_{xy}}}}\end{pmatrix}\begin{pmatrix}p_{0} \\p_{1} \\p_{2} \\p_{3}\end{pmatrix}} \\{= \begin{pmatrix}{\sum\limits_{k = 1}^{n}\quad {\sum\limits_{{W \in x},y}^{\quad}{\left( {1 - s_{x}} \right)\quad \left( {1 - t_{y}} \right)X_{xy}^{t}Z_{k}}}} \\{\sum\limits_{k = 1}^{n}\quad {\sum\limits_{{W \in x},y}^{\quad}{s_{x}\quad \left( {1 - t_{y}} \right)X_{xy}^{t}Z_{k}}}} \\{\sum\limits_{k = 1}^{n}\quad {\sum\limits_{{W \in x},y}^{\quad}{\left( {1 - s_{x}} \right)\quad t_{y}X_{xy}^{t}Z_{k}}}} \\{\sum\limits_{k = 1}^{n}\quad {\sum\limits_{{W \in x},y}^{\quad}{s_{x}\quad t_{y}X_{xy}^{t}Z_{k}}}}\end{pmatrix}}\end{matrix}$

[0102] This is a simultaneous equation for local elements. With respectto the entire system including plural elements, simultaneous equationsfor local elements are added, so as to determine a simultaneous equationof the entire system. When this simultaneous equation is solved, all theparameters a, b, c and d of the respective nodal lines can be obtained.

[0103] When nodal lines are disposed at vertical and horizontalintervals of 10 pixels in a luminance ratio image with a width of 640pixels and a height of 480 pixels, 3185 (65×49) nodal lines arearranged. Since each nodal line has the four parameters a, b, c and d,simultaneous equations with 12740 (3185×4) elements are solved, so as todetermine the parameters necessary for calculating the depth values (Zvalues) of the respective pixels of the input image.

[0104] In the depth calculation parameter calculating step S11, theaforementioned calculations are carried out with respect to the pluralluminance ratio images for the calibration previously stored in thememory 100, so as to determine the parameters necessary for the depthcalculation.

[0105] In the light intensity ratio calculating step S12, the lightintensity ratio ρ of each pixel of the input images (corresponding tothe light patterns A and B) is calculated.

[0106] In the depth calculating step S13, the depth value Z of eachpixel is calculated in accordance with Equations 2 and 3 by using thecoordinate values x and y of the target pixel, the light intensity ratioρ of the target pixel and the parameters of close four nodal lines.

[0107] In the three-dimensional coordinates calculating step S14,remaining three-dimensional coordinate values X and Y are calculated onthe basis of the coordinate values x and y of the pixel and the depthvalue Z. The coordinate values x and y of the pixel and the depth valueZ are converted into the three-dimensional coordinate values X and Y byusing geometric characteristics of the camera system (such as a viewingangle per pixel and lens strain).

[0108] When the light patterns A and B and the plural images used in thecalculation of the calibration light intensity ratios are subjected to alow-pass filter, the influence of noise included in the images can bereduced. Also, when the depth value is subjected to a low-pass filter ora median filter, the same effect can be attained.

[0109] When the interval between nodal points is reduced, the number ofparameters used in the calculation is increased but the accuracy incalculating the distance can be improved, and when the interval isincreased, the number of parameters is reduced but the accuracy incalculating the distance is lowered. As a result of current experiments,it is found that the accuracy in calculating the distance is minimallylowered even when the vertical and horizontal interval between nodalpoints is increased up to approximately 50 pixels in an image with awidth of 640 pixels and a height of 480 pixels.

[0110] Through the aforementioned three-dimensional measurementcalculation, the three-dimensional measurement can be accurately carriedout even when the light source is not a point light source but has agiven size as the light source array unit 11 of this embodiment.Needless to say, even when a point light source is used, theaforementioned three-dimensional measurement can be employed.Furthermore, it goes without saying that the aforementioned method iseffective in using a light source apparatus with a given size other thanthe light source array.

[0111] (Modification of Light Quantity)

[0112]FIG. 15A is a graph for showing the distribution of a brightnessratio obtained by projecting the light patterns A and B of FIGS. 4A and4B on a frontal parallel plane disposed in front of a camera. FIG. 15Bshows the emission intensity of each LED of the light source array unit11 in projecting the light pattern A.

[0113] As is understood from FIG. 15A, a region where the brightnessratio is monotonically reduced (or monotonically increased), namely, arange used in the three-dimensional measurement, is merely a region a inthe entire projection range of the light pattern. This is because thelight quantity of the light source array unit 11 is reduced and hencethe light quantity is not linearly changed in the vicinity of the edgesof the projection range of the light pattern. In other words, althoughthe radiation angles of the respective LEDs mutually overlap and theoverlap portions are added up so as to realize a constant change of thelight quantity in the light pattern, the number of LEDs whose emissionsare effectively added up is reduced in the vicinity of the edges of thearray, and hence, the light quantity is relatively lowered. Also,another reason is the quantity of received light is reduced in theperiphery of an image taken by the camera 1 derived from the lensshading.

[0114] For these reasons, the range used in the three-dimensionalmeasurement is restricted to be smaller than the projection range of thelight patterns. Therefore, in order to enlarge the spatial range wherethe three-dimensional position can be measured, the light quantity ofeach LED is herein modified by using a modification coefficient as shownin FIG. 15C.

[0115] Specifically, a product obtained by multiplying a light quantitycontrol value in accordance with the light pattern as shown in FIG. 15Bby the modification coefficient as shown in FIG. 15C is used as a newlight quantity control value. Thus, without changing the light quantityratio between the two kinds of light patterns, the light quantities ofthe light sources disposed in the vicinity of the edges of the lightsource array unit 11 are increased by a predetermined ratio as comparedwith the light quantities of the light sources disposed at the center,so as to suppress the lowering of the light quantity at the edges of thelight source array unit 11, resulting in enlarging the region a shown inFIG. 15A. Specifically, when the emission intensities of the lightsources disposed in the vicinity of the edges of the light source arrayunit 11 are modified, a spatial range where high brightness is attainedcan be enlarged and a spatial range where the brightness ratio ismonotonically changed can be enlarged. As a result, the spatial rangewhere the three-dimensional position can be measured is enlarged.

[0116]FIGS. 16A and 16B are graphs for showing the relationship betweenthe light pattern and the brightness ratio measured through experimentsby the present inventors. FIG. 16A shows data obtained before themodification and FIG. 16B shows data obtained after the modification. Asshown in FIG. 16A, a brightness difference d1 between a peak point and aminimum point in the vicinity of the edge is large and cannot bemeasured in the periphery before the modification. In contrast, throughthe aforementioned modification, a brightness difference d2 between apeak point and a minimum point in the vicinity of the edge can bereduced as shown in FIG. 16B with the brightness ratio kept as that ofFIG. 16A. Thus, the measurable range can be enlarged.

[0117] In the case where the light patterns are generated by controllingthe emission time instead of the emission intensity, the same effect canbe attained by multiplying the emission time by the modificationcoefficient as shown in FIG. 15C.

[0118] Embodiment 2

[0119]FIG. 17 is a diagram for showing the structure of a range finderaccording to Embodiment 2 of the invention. In FIG. 17, like referencenumerals are used to refer to like elements shown in FIG. 1. The rangefinder of FIG. 17 further includes a projected light pattern controlunit 14 for instructing the light source control unit 12 about the kindof set of light patterns to be projected from the light source arrayunit 11. The light source array unit 11 and the light source controlunit 12 together form a projection unit 20.

[0120] As a characteristic of this embodiment, the measurement range andthe measurement accuracy can be changed by changing the kind of set ofprojected light patterns by the projected light pattern control unit 14.The basic operation of the range finder of this embodiment is the sameas that of Embodiment 1, and specifically, two kinds of light patternsas shown in FIGS. 4A and 4B are projected and reflected light from asubject is taken with the camera 1, so as to measure thethree-dimensional position of the subject. The three-dimensionalmeasurement is also carried out in the same manner as in Embodiment 1.The projected light pattern control unit 14 supplies the distancecalculation unit 13 with calculation parameter information necessary forthe three-dimensional measurement in accordance with the kind of set oflight patterns instructed to the light source control unit 12.

[0121]FIGS. 18A and 18B are diagrams for showing examples of the controlof the measurement range. In FIG. 18A, the size of the measurement rangeis changed. Specifically, in the case shown as {circle over (1)}, theemission intensity is changed over the entire light projection range ofthe light source array unit 11 as described in Embodiment 1, and theresultant measurement range AR{circle over (1)} is the largest. Incontrast, in the case shown as {circle over (2)}, the emission intensityis changed in merely a substantially center part of the light projectionrange, and hence, the resultant measurement range AR{circle over (2)} issmaller. However, in the case {circle over (2)}, although themeasurement range is smaller, the change of the emission intensitywithin the measurement range is larger than in the case {circle over(1)}, and hence, the measurement accuracy can be higher than in the case{circle over (1)}.

[0122] Alternatively, in FIG. 18B, the position of the measurement rangeis changed. Specifically, in the case shown as {circle over (3)}, a parton the left hand side within the projection range of the light patternscorresponds to a measurement range AR{circle over (3)}, and in the caseshown as {circle over (4)}, a part on the right hand side within theprojection range corresponds to a measurement range AR{circle over(4)}). Specifically, the measurement range can be optionally movedwithin the viewing angle of the camera. In other words, the direction ofthe measurement can be changed.

[0123] When the light source array unit 11 is used, any of the optionallight patterns as shown in FIGS. 18A and 18B can be very easilyelectronically generated by controlling a voltage or current applied toeach light source. Therefore, the range finder can be provided with avariety of measurement modes.

[0124]FIGS. 19A and 19B show examples of the measurement modes. Themeasurement range is divided into plural (seven in the drawing) rangesas shown in FIG. 19A, the light pattern as shown in FIG. 18B isprojected in each of the divided measurement ranges, and thethree-dimensional measurement is successively carried out in thesedivided measurement range, so as to synthesize the measurement results.Thus, highly accurate three-dimensional measurement can be carried outover the entire field of the camera. In other words, in addition to thegeneral measurement mode for projecting a first set of light patternshaving the general projection range as in the case {circle over (1)} ofFIG. 18A, an accurate measurement mode in which a second set of lightpatterns having a smaller projection range than the first set of lightpatterns is projected in a plurality of directions as shown in FIG. 19Acan be provided.

[0125] Alternatively, as shown in FIG. 19B, the light patterns are firstprojected in the entire field of the camera for the three-dimensionalmeasurement, and thereafter, an interesting portion is specified in theresultant image data, so that the second set of light patterns havingthe smaller projection range can be projected in the specified portionfor more accurate measurement. Thus, a measurement mode for conductingan intelligent operation can be provided.

[0126] As described so far, according to this embodiment, the range andthe direction of the three-dimensional measurement can be electronicallychanged. Also, the accuracy in the three-dimensional measurement can becontrolled if necessary.

[0127] Although an optional light pattern is generated by using thelight source array unit in this embodiment, an optional light patterncan be generated by, for example, scanning a point light source with agalvano-mirror. In other words, the same effect can be attained byvarying the light intensity of the light source with time during themirror scanning. Furthermore, similar light patterns can be generated byusing a projector for reproducing an image sequence as the light source.Specifically, a light pattern can be generated by displaying any of thelight patterns of FIGS. 18A and 18B on the projector.

[0128] In each of the embodiments of the invention, the light sourcearray unit can be plural in number, so that the respective light sourcearray units can be disposed so as to have different projectiondirections. Thus, the light patterns can be projected over a largerspatial range.

[0129] In each of the embodiments, although the plural light patterns Aand B are generated on a time-shared basis, the two kinds of lightpatterns can be simultaneously projected by using light sources ofdifferent wavelengths. In this case, for example, two kinds of lightsources of different wavelengths are uniformly mixed to be disposed inthe light source array unit 11, so as to generate the light patterns Aand B by using the light sources of the respective wavelengths. However,in this case, the camera is required to be provided with a mechanism forselecting the wavelength such as a filter. Alternatively, a similarstructure can be realized by using a light source capable of outputtinga plurality of lights of different wavelengths.

[0130] The light source array unit of this invention can be similarlyrealized by using a light source other than the LED, such as an organicEL (electroluminescence) device.

[0131]FIG. 20 is a diagram for showing the structure of one pixel of anEL display. As shown in FIG. 20, the organic EL device has a structureincluding an organic thin film sandwiched between an anode and acathode. When a DC voltage is applied, holes are injected from the anodeand electrons are injected from the cathode. The holes and the electronsare recombined in the organic thin film, and energy generated at thispoint excites the organic material, so as to emit light of a colorpeculiar to the organic material. The light emitted from the organicmaterial is output to the outside because at least one of the electrodes(the anode in the drawing) is transparent.

[0132] The organic EL display is fabricated by two-dimensionallyarranging the devices each having the structure of FIG. 20 as RGBpixels. This structure is similar to the light source array of FIG. 3Aor 3B, and hence, the light patterns described in the embodiments can begenerated. In this case, when each pixel is provided with a microlens,the spread of light is narrowed, so as to more efficiently project thelight.

[0133] Alternatively, a surface emitting light source can be obtained byincreasing the structure of each device. In this case, the lightdistribution as shown in FIG. 15A can be obtained by applying differentvoltages in accordance with the positions of the electrodes.

[0134] Also, the range finder described in each embodiment is capable ofmeasuring the three-dimensional position of a subject, and hence can beused in an apparatus for individual certification by using an iris of aperson. In this case, the three-dimensional position of an eye of aperson is first measured with the range finder, and the camera isaccurately zoomed up toward the position so as to take an enlarged irispattern of the person. Then, the certification processing is executed byusing the taken image of the iris. Alternatively, the range finder canbe used for generating three-dimensional shape data of a subject. Inthis case, on the basis of a range image measured by the range finder,the subject is represented by the polygon expression used inthree-dimensional CG (computer graphics). Thus, the three-dimensionalshape of the subject can be dealt with as general CG data.

[0135] In this manner, according to the invention, the three-dimensionalmeasurement can be stably carried out because a sufficient quantity oflight can be projected on a subject as a whole even when each lightsource has a small light quantity. Also, an optional light pattern canbe electrically generated without using a mechanical mechanism.

What is claimed is:
 1. A range finder for measuring a three-dimensionalposition of a subject by projecting light on said subject and receivingreflected light, comprising: a light source array unit in which aplurality of light sources are arranged; and a light source control unitfor allowing at least two kinds of light patterns to be projected fromsaid light source array unit by controlling a light emitting state ofeach of said plurality of light sources of said light source array unit.2. The range finder of claim 1, wherein each of said plurality of lightsources is an LED.
 3. The range finder of claim 1, wherein saidplurality of light sources are arranged in a lattice pattern or acheckered pattern in said light source array unit.
 4. The range finderof claim 1, wherein said plurality of light sources are arranged on acurved surface in said light source array unit.
 5. The range finder ofclaim 1, wherein said plurality of light sources are arranged on a flatsurface with optical axes thereof radially disposed in said light sourcearray unit.
 6. The range finder of claim 1, wherein in said light sourcearray unit, a projection range is divided into a plurality of ranges ina direction for forming said light patterns, and groups of light sourcesrespectively covering said divided ranges are aligned along a directionperpendicular to the direction for forming said light patterns.
 7. Therange finder of claim 1, wherein said light source control unitgenerates said light patterns by controlling emission intensities ofsaid plurality of light sources in accordance with positions thereof. 8.The range finder of claim 1, wherein said light source control unitgenerates said light patterns by controlling emission times of saidplurality of light sources in accordance with positions thereof.
 9. Therange finder of claim 7 or 8, wherein said light source control unitmodifies said emission intensities or said emission times of lightsources disposed in the vicinity of an edge of said light source arrayunit for enlarging a spatial range where the three-dimensional positionis able to be measured in projecting said two kinds of light patterns.10. The range finder of claim 1, wherein said light source array unit isplural in number, and said plural light source array units are arrangedwith light projection directions thereof different from each other. 11.The range finder of claim 1, further comprising a three-dimensionalmeasurement unit for carrying out three-dimensional measurement on thebasis of reflected light images, wherein said three-dimensionalmeasurement unit stores, before the three-dimensional measurement, aparameter of an equation for approximating a space locus having aconstant light intensity ratio between said two kinds of light patternsprojected from said light source array unit; obtains a brightness ratioof a target pixel on the basis of reflected light images respectivelyobtained with said two kinds of light patterns projected; and carriesout the three-dimensional measurement by using said brightness ratio ofsaid target pixel and said parameter of the space locus.
 12. The rangefinder of claim 1, further comprising a three-dimensional measurementunit for carrying out three-dimensional measurement on the basis ofreflected light images, wherein said three-dimensional measurement unitstores, before the three-dimensional measurement, a plurality ofluminance ratio images in each of which a light intensity ratio betweensaid two kinds of light patterns projected from said light source arrayunit is expressed on a plane with a different fixed depth value; obtainsa brightness ratio of a target pixel based on reflected light imagesrespectively obtained with said two kinds of light patterns projected;and carries out the three-dimensional measurement by comparing saidbrightness ratio of said target pixel with a light intensity ratio inthe vicinity of coordinates of said target pixel in each of saidluminance ratio images.
 13. The range finder of claim 1, furthercomprising a three-dimensional measurement unit for carrying outthree-dimensional measurement on the basis of reflected light images,wherein said three-dimensional measurement unit stores, before thethree-dimensional measurement, a plurality of luminance ratio images ineach of which a light intensity ratio between said two kinds of lightpatterns projected from said light source array unit is expressed on aplane with a different fixed depth value; sets representative points ineach of said plurality of luminance ratio images and determines aparameter of a relational expression between a light intensity ratio anda depth value of each of said representative points on the basis of saidplurality of luminance ratio images and said different depth valuescorresponding to said luminance ratio images; obtains a light intensityratio of a target pixel based on reflected light images respectivelyobtained with said two kinds of light patterns projected; and carriesout the three-dimensional measurement by using coordinate values of saidtarget pixel, said light intensity ratio of said target pixel and saidparameter of said relational expression between the light intensityratio and the depth value of each of said representative points.
 14. Amethod for measuring a three-dimensional position of a subject based onreflected light images respectively obtained with at least two kinds oflight patterns projected on said subject, comprising the steps of:storing a parameter of an equation for approximating a space locushaving a constant light intensity ratio between said two kinds of lightpatterns before three-dimensional measurement; obtaining a brightnessratio of a target pixel on the basis of reflected light imagesrespectively obtained with said two kinds of light patterns projected;and carrying out the three-dimensional measurement by using saidbrightness ratio of said target pixel and said parameter of the spacelocus.
 15. A method for measuring a three-dimensional position of asubject based on reflected light images respectively obtained with atleast two kinds of light patterns projected on said subject, comprisingthe steps of: storing a plurality of luminance ratio images in each ofwhich a light intensity ratio between said two kinds of light patternsis expressed on a plane with a different fixed depth value beforethree-dimensional measurement; obtaining a brightness ratio of a targetpixel based on reflected light images respectively obtained with saidtwo kinds of light patterns projected; and carrying out thethree-dimensional measurement by comparing said brightness ratio of saidtarget pixel with a light intensity ratio in the vicinity of coordinatesof said target pixel on each of said luminance ratio images.
 16. Amethod for measuring a three-dimensional position of a subjected basedon reflected light images respectively obtained with at least two kindsof light patterns projected on said subject, comprising the steps of:storing a plurality of luminance ratio images in each of which a lightintensity ratio between said two kinds of light patterns is expressed ona plane with a different fixed depth value before three-dimensionalmeasurement; setting representative points on each of said luminanceratio images and determining a parameter of a relational expressionbetween a light intensity ratio and a depth value of each of saidrepresentative points on the basis of said plurality of luminance ratioimages and said different depth values respectively corresponding tosaid luminance ratio images; obtaining a light intensity ratio of atarget pixel based on reflected light images respectively obtained withsaid two kinds of light patterns projected; and carrying out thethree-dimensional measurement by using coordinate values of said targetpixel, said light intensity ratio of said target pixel and saidparameter of said relational expression between the light intensityratio and the depth value of each of said representative points.
 17. Arange finder for measuring a three-dimensional position of a subject byprojecting light on said subject and receiving reflected light,comprising: a projection unit for projecting at least two kinds of lightpatterns; and a projected light pattern control unit for making ameasurement range or measurement accuracy variable by changing a set oflight patterns to be projected from said projection unit.
 18. The rangefinder of claim 17, wherein said projection unit includes: a lightsource array unit in which a plurality of light sources are arranged;and a light source control unit for allowing said light source arrayunit to project a set of light patterns by controlling a light emittingstate of each of said plurality of light sources of said light sourcearray unit, and said projected light pattern control unit instructs saidlight source control unit about a kind of set of light patterns to beprojected from said light source array unit.
 19. The range finder ofclaim 17, wherein said projected light pattern control unit has ageneral measurement mode for projecting a first set of light patternshaving a general projection range and an accurate measurement mode forprojecting a second set of light patterns having a smaller projectionrange than said first set of light patterns into plural directions. 20.The range finder of claim 17, wherein said projected light patterncontrol unit has a measurement mode in which a first set of lightpatterns having a relatively large projection range is projected at aninitial stage of measurement and a second set of light patterns having arelatively small projection range is subsequently projected in aspecific region of said relatively large projection range.
 21. A lightsource apparatus comprising a plurality of light sources arrangedtherein, being capable of projecting a desired light pattern bycontrolling a light emitting state of each of said plurality of lightsources, wherein said plurality of light sources are arranged on a flatsurface with optical axes thereof radially disposed.
 22. A light sourceapparatus comprising a plurality of light sources arranged therein,being capable of projecting a desired light pattern by controlling alight emitting state of each of said plurality of light sources, whereina projection range is divided into a plurality of ranges in a directionfor forming said light pattern, and groups of light sources respectivelycovering said plurality of divided ranges are aligned in a directionperpendicular to said direction for forming said light pattern.